package com.zjhcsoft.shop.dao.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Repository;

import com.zjhcsoft.common.dao.MybatisCommonDao;
import com.zjhcsoft.shop.dao.SerialDao;
import com.zjhcsoft.shop.model.Serial;

@SuppressWarnings("unchecked")
@Repository
public class SerialDaoImpl extends MybatisCommonDao<Serial, Long> implements SerialDao {
	
	private static final Logger logger = Logger.getLogger(SerialDaoImpl.class);
	
	public SerialDaoImpl(){
		super.tableName="serial";
		super.primaryKeyName="id";
		super.defaultSort="ordernum";
		super.defaultDir="asc";
	}
	/* (non-Javadoc)
	 * @see com.zjhcsoft.shop.dao.impl.TypeDao#findAll(java.lang.Class)
	 */
	public   List<Serial> findAll(Class<Serial>  entityClass){
		 try {
			return super.findAll(entityClass);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			logger.error(e.getMessage());
		}
		return null;
	}
	
	
}
